]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenShield: fix trace back when unlocking session from another vt
authorRay Strode <rstrode@redhat.com>
Wed, 8 Oct 2014 13:39:44 +0000 (09:39 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 8 Oct 2014 13:43:33 +0000 (09:43 -0400)
commit 1d374ac8bd496f6fa6f4c55ffd207bd30bd50075 introduced a bug that
prevents unlock from working when initiated from another VT
(user switching).

This commit fixes the exception raised.

https://bugzilla.gnome.org/show_bug.cgi?id=708105

js/ui/screenShield.js

index 1c1dca6cf1a5dfea450035a5b9f5fe6bc70cdb4c..32ef1ca9e1717b6144c449d4181b0e08014ecc6c 100644 (file)
@@ -920,8 +920,10 @@ const ScreenShield = new Lang.Class({
         this._lockScreenState = MessageTray.State.HIDDEN;
         this._lockScreenGroup.hide();
 
-        this._dialog.actor.grab_key_focus();
-        this._dialog.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
+        if (this._dialog) {
+            this._dialog.actor.grab_key_focus();
+            this._dialog.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
+        }
     },
 
     _hideLockScreen: function(animate, velocity) {